import { RouteRecordRaw } from "vue-router";
import HomeView from "@/views/HomeView.vue";
import AboutView from "@/views/AboutView.vue";
import UserLoginView from "@/views/UserLoginView.vue";
import UserRegisterView from "@/views/UserRegisterView.vue";
import ProductDetailsView from "@/views/Product/ProductDetailsView.vue";
import PaymentView from "@/views/payment/PaymentView.vue";
import MyOrderView from "@/views/Order/MyOrderView.vue";
import MyProductView from "@/views/Product/MyProductView.vue";
import PersonalSettingsView from "@/views/personage/PersonalSettingsView.vue";
import CommentManagementView from "@/views/comment/CommentManagementView.vue";
import ProductReleaseView from "@/views/Product/ProductReleaseView.vue";
import ProductExamineView from "@/views/Product/ProductExamineView.vue";
import UserManagementView from "@/views/user/UserManagementView.vue";
import ShoppingCartView from "@/views/shop/ShoppingCartView.vue";

export const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/about",
    name: "about",
    component: AboutView,
  },
  {
    path: "/common/login",
    name: "登录",
    component: UserLoginView,
  },
  {
    path: "/common/register",
    name: "注册",
    component: UserRegisterView,
  },
  {
    path: "/product/productDetails/:productId",
    name: "商品详细",
    component: ProductDetailsView,
  },
  {
    path: "/payment/paymentView/:orderId",
    name: "支付",
    component: PaymentView,
  },
  {
    path: "/order/myOrder",
    name: "我的订单",
    component: MyOrderView,
  },
  {
    path: "/product/myProduct",
    name: "我的商品",
    component: MyProductView,
  },
  {
    path: "/personage/personageSettings",
    name: "个人设置",
    component: PersonalSettingsView,
  },
  {
    path: "/comment/commentManagement",
    name: "评论管理",
    component: CommentManagementView,
  },
  {
    path: "/product/productRelease",
    name: "发布商品",
    component: ProductReleaseView,
  },
  {
    path: "/product/productExamine",
    name: "审核商品",
    component: ProductExamineView,
  },
  {
    path: "/user/userManagement",
    name: "用户管理",
    component: UserManagementView,
  },
  {
    path: "/cart/myCart",
    name: "购物车",
    component: ShoppingCartView,
  },
];
